package com.ys.enume.flow;

public class YspDefNodeEnum {
	
	public enum Type {
		START("Start", 1), DEFAULT("Default", 2), CONDITIONAL("Conditional", 3), END("End", 4);
		public String name;
		public Integer value;

		private Type(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
		
		public static Integer getValue(String name) {
			if (name == null) {
				return null;
			} else {
				for (Type e : Type.values()) {
					if (name.equals(e.name)) {
						return e.value;
					}
				}
			}
			return null;
		}
	}
	
	public enum AuditorType {
		OPERATOR_PARENT("运营机构上级", 1),
		DEPT_PARENT("组织机构上级", 2),
		USER_POINTED("指定用户", 3),
		ROLE_AND("指定角色并签", 4),
		ROLE_OR("指定角色或签", 5),
		SCRIPT_POINT("指定脚本", 6),
		CREATER("制单人", 7);
		public String name;
		public Integer value;

		private AuditorType(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
		
		public static Integer getValue(String name) {
			if (name == null) {
				return null;
			} else {
				for (AuditorType e : AuditorType.values()) {
					if (name.equals(e.name)) {
						return e.value;
					}
				}
			}
			return null;
		}
	}
}
